package designPatterns_demo.prototype_pattern.deep_clone.demo1;

import java.io.Serializable;

@SuppressWarnings("unused")
public class GoldRingedStaff implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = -2143284340891329800L;
	
	private float height = 100.0f;
	private float diameter = 10.0f;
	
	/**
     * 增长行为，每次调用长度和半径增加一倍
     */
	public void grow() {
		this.height *= 2;
		this.diameter *= 2;
	}
	
	/**
     * 缩小行为，每次调用长度和半径减少一半
     */
	public void shrink() {
		this.height /= 2;
		this.diameter /= 2;
	}
}
